<%@ page import="ac.zlf.springmybatis.admin.bjui.constant.Uri" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/_common_prefix.jsp" %>
<div class="bjui-pageContent">
  <c:choose>
    <c:when test="${empty entity or empty entity.id}">
      <form action="${root}<%=Uri._A_MENU_ADD_SUBMIT%>" data-toggle="validate" data-reload-navtab="true" method="post">
    </c:when>
    <c:otherwise>
      <form action="${root}<%=Uri._A_MENU_UPDATE_SUBMIT%>" data-toggle="validate" data-reload-navtab="true" method="post">
        <input type="hidden" name="id" value="${entity.id}">
    </c:otherwise>
  </c:choose>
    <div class="pageFormContent" data-layout-h="0">
      <table class="table-hover hw-table-long-input" width="100%">
        <tbody>
          <tr>
            <td align="right">
              <label class="control-label" for="_a_menu_facion">图标：</label>
            </td>
            <td>
              <input type="text" id="_a_menu_facion" name="facion" maxlength="20" value="${entity.facion}" placeholder="请输入图标样式" />
              <input type="hidden" name="parentId" value="${entity.parentId}"/>
            </td>
          </tr>
          <tr>
            <td align="right">
              <label class="control-label" for="_a_menu_menuName">菜单名称<span class="required">*</span>：</label>
            </td>
            <td>
              <input type="text" id="_a_menu_menuName" name="menuName" data-rule="required" maxlength="20" value="${entity.menuName}" placeholder="请输入菜单名称" />
            </td>
          </tr>
          <tr>
            <td align="right">
              <label class="control-label" for="_a_menu_url">菜单URL：</label>
            </td>
            <td>
              <input type="text" id="_a_menu_url" name="url" maxlength="20" value="${entity.url}" placeholder="请输入菜单URL" />
            </td>
          </tr>
          <tr>
            <td align="right">
              <label class="control-label" for="_a_menu_sort">菜单排序号<span class="required">*</span>：</label>
            </td>
            <td>
              <input type="text" id="_a_menu_sort" name="sort" data-rule="required;digits" maxlength="20" value="${entity.sort}" placeholder="请输入菜单排序号" />
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </form>
</div>
<div class="bjui-pageFooter">
  <ul>
    <li><a href="${root}<%=Uri._A_MENU_PAGE_SHOW%>" class="btn btn-red" data-toggle="navtab" data-id="navtab">取消</a></li>
    <li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
  </ul>
</div>